<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/menuAplicacionCompania.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ListTblcompaniaTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:form id="form">

                <h:outputText escape="false" value="#{bundle.ListTblcompaniaEmpty}" rendered="#{tblcompaniaController.items.rowCount == 0}"/>
                <p:panel  id="panel" rendered="#{tblcompaniaController.items.rowCount > 0}" header="#{bundle.ListTblcompaniaTitle}"  style="panel">
                    <p:messages id="msgs"/>
                    <p:dataTable value="#{tblcompaniaController.items}" var="item" paginator="true" rows="10">
                        <p:column sortBy="#{item.codCompania}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_codCompania}"/>
                            </f:facet>
                            <h:outputText value="#{item.codCompania}"/>
                        </p:column>
                        <p:column sortBy="#{item.nomNomina}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_nomNomina}"/>
                            </f:facet>
                            <h:outputText value="#{item.nomNomina}"/>
                        </p:column>
                        <p:column sortBy="#{item.nit}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_nit}"/>
                            </f:facet>
                            <h:outputText value="#{item.nit}"/>
                        </p:column>
                        <p:column sortBy="#{item.objSocial}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_objSocial}"/>
                            </f:facet>
                            <h:outputText value="#{item.objSocial}"/>
                        </p:column>
                        <p:column sortBy="#{item.direccion}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_direccion}"/>
                            </f:facet>
                            <h:outputText value="#{item.direccion}"/>
                        </p:column>
                        <p:column sortBy="#{item.telefono1}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_telefono1}"/>
                            </f:facet>
                            <h:outputText value="#{item.telefono1}"/>
                        </p:column>
                        <p:column sortBy="#{item.telefono2}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_telefono2}"/>
                            </f:facet>
                            <h:outputText value="#{item.telefono2}"/>
                        </p:column>
                        <p:column sortBy="#{item.fax}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_fax}"/>
                            </f:facet>
                            <h:outputText value="#{item.fax}"/>
                        </p:column >
                        <p:column sortBy="#{item.aaereo}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_aaereo}"/>
                            </f:facet>
                            <h:outputText value="#{item.aaereo}"/>
                        </p:column>
                        <p:column sortBy="#{item.email}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_email}"/>
                            </f:facet>
                            <h:outputText value="#{item.email}"/>
                        </p:column>
                        <p:column sortBy="#{item.numCuenta}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_numCuenta}"/>
                            </f:facet>
                            <h:outputText value="#{item.numCuenta}"/>
                        </p:column>
                        <p:column sortBy="#{item.salMinimo}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_salMinimo}"/>
                            </f:facet>
                            <h:outputText value="#{item.salMinimo}"/>
                        </p:column>
                        <p:column sortBy="#{item.subTransporte}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_subTransporte}"/>
                            </f:facet>
                            <h:outputText value="#{item.subTransporte}"/>
                        </p:column>
                        <p:column sortBy="#{item.diasClave}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_diasClave}"/>
                            </f:facet>
                            <h:outputText value="#{item.diasClave}"/>
                        </p:column>
                        <p:column sortBy="#{item.periodoPago}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_periodoPago}"/>
                            </f:facet>
                            <h:outputText value="#{item.periodoPago}"/>
                        </p:column >
                        <p:column sortBy="#{item.pais}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_pais}"/>
                            </f:facet>
                            <h:outputText value="#{item.pais}"/>
                        </p:column>
                        <p:column sortBy="#{item.impuesto}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_impuesto}"/>
                            </f:facet>
                            <h:outputText value="#{item.impuesto}"/>
                        </p:column>
                        <p:column sortBy="#{item.departamento}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_departamento}"/>
                            </f:facet>
                            <h:outputText value="#{item.departamento}"/>
                        </p:column>
                        <p:column sortBy="#{item.ciudad}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_ciudad}"/>
                            </f:facet>
                            <h:outputText value="#{item.ciudad}"/>
                        </p:column>
                        <p:column sortBy="#{item.banco}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTblcompaniaTitle_banco}"/>
                            </f:facet>
                            <h:outputText value="#{item.banco}"/>
                        </p:column>
                        <p:column >

                            <p:commandButton action="#{tblcompaniaController.prepareEdit}" value="#{bundle.ListTblcompaniaEditLink}"/>

                            <p:commandButton action="#{tblcompaniaController.destroy}" update=":form" value="#{bundle.ListTblcompaniaDestroyLink}"/>
                        </p:column>
                    </p:dataTable>
                </p:panel>                    
                <p:commandButton action="#{tblcompaniaController.prepareCreate}" value="#{bundle.ListTblcompaniaCreateLink}"/>


            </h:form>
        </ui:define>
    </ui:composition>

</html>
